﻿using System;

namespace Storyteller.Framework.Math
{
    public static class MathHelper
    {
        public const float Pi = 3.14159265f;
        public const float PiOver2 = Pi / 2;
        public const float PiOver3 = Pi / 3;
        public const float PiOver4 = Pi / 4;
        public const float PiOver6 = Pi / 6;
        public const float TwoPi = 2 * Pi;
        public const float ThreePiOver2 = 3 * Pi / 2;

        public static float Lerp(float a, float b, float t)
        {
                return a + (b - a) * t;
        }

        public static Vector2 Lerp(Vector2 a, Vector2 b, float t)
        {
                return a + (b - a) * t;
        }
        
        public static bool Xor(bool lhs, bool rhs)
        {
                return !(lhs && rhs) && (lhs || rhs);
        }        
    }
}
